<div class="panel bar fix hasMenu" style="min-height:0;{{if position_left}}left:{{:position_left}};{{/if}}{{if position_top}}top:{{:position_top}};{{/if}}" tpl="step">
	<div class="title">
	{{if action && action.method=="modify"}}
	{{:lang.modify_step}}
	{{else action && action.method=="addUp"}}
	{{:lang.insert_up}}
	{{else action && action.method=="addDown"}}
	{{:lang.insert_down}}
	{{else}}
	{{:lang.add_step}}
	{{/if}}
		<ul class="toolbar right">
			<li title="{{:lang.close}}" class="button bar-close ico close">
			</li>
		</ul>
	</div>
	<form>
		<div class="grid-container">

			<div class="grid">
				<div class="col col-7-12">
					<label>{{:lang.step_name}}
						<input name="name" {{if form}}value="{{:form.name}}" {{/if}}/>
					</label>
				</div>
				<div class="col col-3-12">
					<label>{{:lang.step_date}}
						<input name="updatedate" readonly />
					</label>
				</div>
				<div class="col col-2-12">
					<label>{{:lang.author}}
						<input name="author" readonly />
					</label>
				</div>
			</div>

			<div class="grid">
				<div class="col col-2-12">
					<label>{{:lang.step_type}}
						<select name="type">
							<option value="Delay" {{if form && form.type=="Delay" }}selected{{/if}}>{{:lang.DelayStep}}</option>
							<option value="Event" {{if form && form.type=="Event" }}selected{{/if}}>{{:lang.EventStep}}</option>
							<option value="Stepby" {{if form && form.type=="Stepby" }}selected{{/if}}>{{:lang.StepbyStep}}</option>
						</select>
					</label>
				</div>
				<div class="col col-10-12">
					{{if form && form.type=="Event"}}
					<label>{{:lang.condition}}
						<input name="condition" {{if form}} value="{{:form.condition}}" {{/if}}/>
					</label>
					{{else}}
					<label>{{:lang.delay}}
						<input name="delay" {{if form}} value="{{:form.delay}}" {{/if}}/>
						<span class="caption">毫秒</span>
					</label>
					{{/if}}
				</div>
			</div>

			<div class="grid grid-flexible align-bottom">
				<div class="col">
					<label>{{:lang.step_object}}
						{{if !form || form.action!="scroll"}}
						<input id="object" name="object" {{if form}} value="{{:form.object}}" {{/if}} /><span class="caption" id="path-result">0</span>
						{{else}}
						<input disabled />
						{{/if}}
					</label>
				</div>
				<div class="col col-minimal">
					<a class="button primary ico search" id="catch">
					</a>
				</div>
			</div>

			<div class="grid">
				<div class="col col-3-12">
					<label>{{:lang.step_action}}
						<select name="action">

							<optgroup label="{{:lang.mouse_op}}">
								<option value="click" {{if form && form.action=="click" }}selected{{/if}}>{{:lang.click}}</option>
								<option value="dblclick" {{if form && form.action=="dblclick" }}selected{{/if}}>{{:lang.dblclick}}</option>
								<option value="mousedown" {{if form && form.action=="mousedown" }}selected{{/if}}>{{:lang.mousedown}}</option>
								<option value="mouseup" {{if form && form.action=="mouseup" }}selected{{/if}}>{{:lang.mouseup}}</option>
								<option value="mousemove" {{if form && form.action=="mousemove" }}selected{{/if}}>{{:lang.mousemove}}</option>
								<option value="mouseenter" {{if form && form.action=="mouseenter" }}selected{{/if}}>{{:lang.mouseenter}}</option>
								<option value="mouseleave" {{if form && form.action=="mouseleave" }}selected{{/if}}>{{:lang.mouseleave}}</option>
								<option value="mouseout" {{if form && form.action=="mouseout" }}selected{{/if}}>{{:lang.mouseout}}</option>
								<option value="mouseover" {{if form && form.action=="mouseover" }}selected{{/if}}>{{:lang.mouseover}}</option>
							</optgroup>

							<optgroup label="{{:lang.form_op}}">
								<option value="val" {{if form && form.action=="val" }}selected{{/if}}>{{:lang.val}}</option>
								<option value="blur" {{if form && form.action=="blur" }}selected{{/if}}>{{:lang.blur}}</option>
								<option value="focus" {{if form && form.action=="focus" }}selected{{/if}}>{{:lang.focus}}</option>
								<option value="change" {{if form && form.action=="change" }}selected{{/if}}>{{:lang.change}}</option>
								<option value="select" {{if form && form.action=="select" }}selected{{/if}}>{{:lang.select}}</option>
								<option value="submit" {{if form && form.action=="submit" }}selected{{/if}}>{{:lang.submit}}</option>
							</optgroup>

							<optgroup label="{{:lang.key_op}}">
								<option value="keydown" {{if form && form.action=="keydown" }}selected{{/if}}>{{:lang.keydown}}</option>
								<option value="keyup" {{if form && form.action=="keyup" }}selected{{/if}}>{{:lang.keyup}}</option>
								<option value="keypress" {{if form && form.action=="keypress" }}selected{{/if}}>{{:lang.keypress}}</option>
							</optgroup>

							<optgroup label="{{:lang.page_op}}">
								<option value="resize" {{if form && form.action=="resize" }}selected{{/if}}>{{:lang.resize}}</option>
								<option value="scroll" {{if form && form.action=="scroll" }}selected{{/if}}>{{:lang.scroll}}</option>
							</optgroup>

						</select>
					</label>
				</div>
				{{if form && form.action=="val"}}
					{{if hasDictionary && hasDictionary==true}}
					<div class="col col-2-12">
						<label>{{:lang.value_type}}
							<select name="param_type">
								<option value="direct" {{if form && form.param_type=="direct" }}selected{{/if}}>{{:lang.direct}}</option>
								<option value="index" {{if form && form.param_type=="index" }}selected{{/if}}>{{:lang.index}}</option>
							</select>
						</label>
					</div>
					{{else}}
					<div class="col col-2-12">
						<label>{{:lang.value_type}}
							<select name="param_type" readonly>
								<option value="direct" selected>{{:lang.direct}}</option>
							</select>
						</label>
					</div>
					{{/if}}
					{{if form.param_type=="index"}}
					<div class="col col-7-12">
						<label>字典字段
							<select name="param_value">
								{{for keys}}
								<option {{if ~root.form.param_value==name}}selected{{/if}}>{{:name}}</option>
								{{/for}}
							</select>
						</label>
					</div>
					{{else}}
					<div class="col col-7-12">
						<label>{{:lang.value}}
							<input name="param_value" {{if form}}value="{{:form.param_value}}" {{/if}}/>
						</label>
					</div>
					{{/if}}
				{{else form && form.action=="scroll"}}
				<div class="col">
					<label>{{:lang.position_top}}
						<input name="position_top" {{if form}}value="{{:form.position_top}}" {{/if}}/>
					</label>
				</div>
				<div class="col">
					<label>{{:lang.position_left}}
						<input name="position_left" {{if form}}value="{{:form.position_left}}" {{/if}}/>
					</label>
				</div>
				{{else}}
				<div class="col col-9-12">
					<label>{{:lang.action_param}}
						<input disabled />
					</label>
				</div>
				{{/if}}
			</div>

			<div class="grid">
				<label>{{:lang.step_describe}}
					<textarea name="comment">{{if form}}{{:form.comment}}{{/if}}</textarea>
				</label>
			</div>
		</div>

		<div class="row">
			<ul class="toolbar right">
				{{if action && action.method=="modify"}}
				<li class="button success large" id="modify" title="{{:lang.modify}}">
					{{:lang.modify}}
					<input type="hidden" name="step_index" value="{{:step_index}}" />
				</li>
				{{else action && (action.method=="new" || action.method=="addUp"|| action.method=="addDown")}}
				<li class="button primary large" id="append" title="{{:lang.append}}">
					{{:lang.append}}
				</li>
				{{/if}}
				<li class="button warning large bar-close" id="cancel" title="{{:lang.cancel}}">
					{{:lang.cancel}}
				</li>
			</ul>
		</div>
	</form>
</div>